.class final Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;
.super Ljava/lang/Object;
.source "UpgradeReqRestAdapter.java"

# interfaces
.implements Lretrofit/RequestInterceptor;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->getInstance(Landroid/content/Context;Ljava/lang/String;)Lretrofit/RestAdapter;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$context:Landroid/content/Context;


# direct methods
.method constructor <init>(Landroid/content/Context;)V
    .registers 2

    .prologue
    .line 35
    iput-object p1, p0, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;->val$context:Landroid/content/Context;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public intercept(Lretrofit/RequestInterceptor$RequestFacade;)V
    .registers 5
    .param p1, "requestFacade"    # Lretrofit/RequestInterceptor$RequestFacade;

    .prologue
    .line 39
    const-string v0, "from_client"

    const-string v1, "NiceAppAndroid"

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addHeader(Ljava/lang/String;Ljava/lang/String;)V

    .line 41
    iget-object v0, p0, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;->val$context:Landroid/content/Context;

    if-eqz v0, :cond_8e

    .line 42
    const-string v0, "openUDID"

    iget-object v1, p0, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;->val$context:Landroid/content/Context;

    # invokes: Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->getDeviceUUId(Landroid/content/Context;)Ljava/lang/String;
    invoke-static {v1}, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->access$000(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 43
    const-string v0, "appVersion"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;->val$context:Landroid/content/Context;

    # invokes: Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->getVersionName(Landroid/content/Context;)Ljava/lang/String;
    invoke-static {v2}, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->access$100(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 44
    const-string v0, "appVersionCode"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;->val$context:Landroid/content/Context;

    invoke-static {v2}, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->getVersionCode(Landroid/content/Context;)I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 45
    const-string v0, "systemVersion"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 46
    const-string v0, "resolution"

    iget-object v1, p0, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter$1;->val$context:Landroid/content/Context;

    # invokes: Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->getResolution(Landroid/content/Context;)Ljava/lang/String;
    invoke-static {v1}, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->access$200(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 47
    const-string v0, "platform"

    const-string v1, "android"

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 48
    const-string v0, "channel"

    const-string v1, "com.zuiapps.upgrade"

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 49
    const-string v0, "lang"

    # invokes: Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->getPhoneLanguage()Ljava/lang/String;
    invoke-static {}, Lcom/zuiapps/library/restful/UpgradeReqRestAdapter;->access$300()Ljava/lang/String;

    move-result-object v1

    invoke-interface {p1, v0, v1}, Lretrofit/RequestInterceptor$RequestFacade;->addQueryParam(Ljava/lang/String;Ljava/lang/String;)V

    .line 51
    :cond_8e
    return-void
.end method
